import axios from './http'
import { getList } from '../util/storage/getlistbycache';

export async function getQuestionGroupList() {
  return await getList('/q_api/question/list')
  // return axios({
  //   url: '/q_api/questiongroup/list',
  //   method: 'get'
  // })
}

export async function getQuestionList() {
  return await getList('/q_api/question/list')
  // return axios({
  //   url: '/q_api/question/list',
  //   method: 'get'
  // })
}

//获取对应题目的数据
export function getQuestionDetail(data) {
  return axios({
    url: `/q_api/question/${data.id}`,
    method: 'get'
  })
}

//获取对应题组的数据
export function getQuestionGroupDetail(data) {
  return axios({
    url: `/q_api/questiongroup/${data.id}`,
    method: 'get'
  })
}